﻿using System;

namespace 睡觉
{
    class Sort : Program
    {
        public void Menu()
        {
            Console.WriteLine(@"请输入：1、查询所有（按学号排序）2、查询所有（按姓名排序）3、查询所有（按年龄排序）4、按学号查询 5、退出");
            int x = int.Parse(Console.ReadLine());
            if (x == 1) { Find1(); }
            else if (x == 2) { Find2(); }
            else { Console.WriteLine("没做完"); }
        }
        public void Find1()
        {
            MyCompare myCompare = new MyCompare();//创建自定义比较器实例
            alist.Sort(myCompare);
            Console.WriteLine("没做完");
            foreach (Student item in alist)
            {

            }
        }
        public void Find2()
        {
            MyCompare myCompare = new MyCompare();//创建自定义比较器实例

            alist.Sort(myCompare);
            foreach (Student item in alist)
            {
                Console.WriteLine(item);
            }
        }
    }
}
